package com.cloudm.technician.ui.modules.cloudm_box.change_box_history

import com.cloudm.technician.data.network.CloudmBoxApi
import com.cloudm.technician.ui.base.RxPresenter

/**
 * 作者: wesley
 * 时间: 2017/12/25
 * 描述: 业务逻辑
 */
class ChangeBoxHistoryPresenter(private val view: ChangeBoxHistoryContract.View,
                                private val cloudmBoxApi: CloudmBoxApi) : RxPresenter(),
        ChangeBoxHistoryContract.Presenter {


    override fun queryMoreFinishChangeDeviceData(page: Int, size: Int, status: Int) {
        request(cloudmBoxApi.queryChangeDeviceData(page, size, status), view,
                onSuccess = { list, loadMoreInfo ->
                    view.loadSuccess(list, loadMoreInfo)
                }, onFailure = { errorMsg ->
            view.loadFailure(errorMsg)
        })
    }
}